package com.lrs.java.j2se_self.lastJava;
import java.io.*;

public class TestFileWriter {
	public static void main(String[] args){
		FileWriter fw = null;
		FileReader fr = null; 
		try{
			fr = new FileReader("c:\\ff.txt");
			fw = new FileWriter("c:\\test.java");
			int b = 0;
			while((b=fr.read()) != -1){
				fw.write(b);
			}		
		}catch(IOException e){
			e.printStackTrace();
		}finally{
			try{
				fr.close();
				fw.close();
			}catch(IOException e){
				e.printStackTrace();
			}
		}
		System.out.println("文件复制成功哦！");
	}
}
